<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAssetsStreamTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
        Schema::connection('xiaole_assets')->create('asset_streams', function(Blueprint $table)
		{
			$table->integer('id', true)->comment('ID');
			$table->integer('asset_id')->index('asset_id')->comment('媒资ID');
			$table->string('stream_id', 200)->nullable()->comment('注入流ID');
			$table->string('cdn_id', 100)->nullable()->comment('注入目标');
			$table->string('ogroup_asset_id', 100)->nullable()->index('ogroup_asset_id')->comment('广电渠道局方的媒资ID');
			$table->text('ogroup_asset_data', 65535)->nullable()->comment('广电渠道局方的媒资数据');
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('assets_stream');
	}

}
